﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Store.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<YourStore.Models.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Product
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Product</h2>
    <table id="storemanager" class="admin">
        <tr>
            <th width="100"></th>
            <th width="300">Title</th>
           <th width="150">Category</th>
        </tr>

    <% foreach (var item in Model) { %>
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.ProductId }) %> |
                <%: Html.ActionLink("Delete", "Delete", new { id = item.ProductId })%>
            </td>
            <td><%: item.Name%></td>
            <%--<td><%: Html.Truncate(item.Artist.Name, 25) %></td>--%>
            <td><%: item.Category.Name%></td>
        </tr>
    
    <% } %>

    </table>
    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>
